package com.base.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 算法配置表
 * @TableName empi_algorithm_config
 */
@TableName(value ="empi_algorithm_config")
@Data
public class EmpiAlgorithmConfig implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 数据源ID
     */
    private String datasourceId;

    /**
     * 权重
     */
    private Integer weight;

    /**
     * 字段CODE多个用逗号分隔
     */
    private String fields;

    /**
     * 
     */
    private String fieldsName;

    /**
     * 判断依据
     */
    private String logic;

    /**
     * 是否启用
     */
    private Integer enable;

    /**
     * 创建时间
     */
    private Date createDate;

    /**
     * 修改时间
     */
    private Date updateDate;

    /**
     * 
     */
    private Integer weightConfigId;

    /**
     * 
     */
    private Integer orderby;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        EmpiAlgorithmConfig other = (EmpiAlgorithmConfig) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDatasourceId() == null ? other.getDatasourceId() == null : this.getDatasourceId().equals(other.getDatasourceId()))
            && (this.getWeight() == null ? other.getWeight() == null : this.getWeight().equals(other.getWeight()))
            && (this.getFields() == null ? other.getFields() == null : this.getFields().equals(other.getFields()))
            && (this.getFieldsName() == null ? other.getFieldsName() == null : this.getFieldsName().equals(other.getFieldsName()))
            && (this.getLogic() == null ? other.getLogic() == null : this.getLogic().equals(other.getLogic()))
            && (this.getEnable() == null ? other.getEnable() == null : this.getEnable().equals(other.getEnable()))
            && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate()))
            && (this.getUpdateDate() == null ? other.getUpdateDate() == null : this.getUpdateDate().equals(other.getUpdateDate()))
            && (this.getWeightConfigId() == null ? other.getWeightConfigId() == null : this.getWeightConfigId().equals(other.getWeightConfigId()))
            && (this.getOrderby() == null ? other.getOrderby() == null : this.getOrderby().equals(other.getOrderby()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDatasourceId() == null) ? 0 : getDatasourceId().hashCode());
        result = prime * result + ((getWeight() == null) ? 0 : getWeight().hashCode());
        result = prime * result + ((getFields() == null) ? 0 : getFields().hashCode());
        result = prime * result + ((getFieldsName() == null) ? 0 : getFieldsName().hashCode());
        result = prime * result + ((getLogic() == null) ? 0 : getLogic().hashCode());
        result = prime * result + ((getEnable() == null) ? 0 : getEnable().hashCode());
        result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
        result = prime * result + ((getUpdateDate() == null) ? 0 : getUpdateDate().hashCode());
        result = prime * result + ((getWeightConfigId() == null) ? 0 : getWeightConfigId().hashCode());
        result = prime * result + ((getOrderby() == null) ? 0 : getOrderby().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", datasourceId=").append(datasourceId);
        sb.append(", weight=").append(weight);
        sb.append(", fields=").append(fields);
        sb.append(", fieldsName=").append(fieldsName);
        sb.append(", logic=").append(logic);
        sb.append(", enable=").append(enable);
        sb.append(", createDate=").append(createDate);
        sb.append(", updateDate=").append(updateDate);
        sb.append(", weightConfigId=").append(weightConfigId);
        sb.append(", orderby=").append(orderby);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}